{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 将活动数据根据词频, 进行聚类分析"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 导入必要包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "from sklearn.cluster import MiniBatchKMeans\n",
    "from sklearn import metrics\n",
    "from sklearn.decomposition import PCA\n",
    "import time\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 读取训练数据\n",
    "train = pd.read_csv('UniqueEventsInfo.csv')\n",
    "\n",
    "# 只保留后面的词频部分\n",
    "n_trains = 5000\n",
    "X_train = train #train.iloc[:n_trains]\n",
    "X_train = X_train.drop(train.columns[range(0,9)],axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>c_1</th>\n",
       "      <th>c_2</th>\n",
       "      <th>c_3</th>\n",
       "      <th>c_4</th>\n",
       "      <th>c_5</th>\n",
       "      <th>c_6</th>\n",
       "      <th>c_7</th>\n",
       "      <th>c_8</th>\n",
       "      <th>c_9</th>\n",
       "      <th>c_10</th>\n",
       "      <th>...</th>\n",
       "      <th>c_92</th>\n",
       "      <th>c_93</th>\n",
       "      <th>c_94</th>\n",
       "      <th>c_95</th>\n",
       "      <th>c_96</th>\n",
       "      <th>c_97</th>\n",
       "      <th>c_98</th>\n",
       "      <th>c_99</th>\n",
       "      <th>c_100</th>\n",
       "      <th>c_other</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 101 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   c_1  c_2  c_3  c_4  c_5  c_6  c_7  c_8  c_9  c_10   ...     c_92  c_93  \\\n",
       "0    0    0    0    0    1    0    0    0    0     0   ...        0     0   \n",
       "1    1    0    2    1    0    0    0    1    0     0   ...        0     0   \n",
       "2    1    0    2    1    0    0    0    1    0     0   ...        0     0   \n",
       "3    1    1    0    0    0    0    0    2    0     0   ...        0     0   \n",
       "4    1    0    3    0    1    0    0    0    0     0   ...        1     0   \n",
       "\n",
       "   c_94  c_95  c_96  c_97  c_98  c_99  c_100  c_other  \n",
       "0     0     0     0     0     0     0      0        5  \n",
       "1     0     0     0     0     0     0      0        8  \n",
       "2     0     0     0     0     0     0      0        9  \n",
       "3     0     0     0     0     0     0      0        9  \n",
       "4     0     0     0     0     0     0      0       11  \n",
       "\n",
       "[5 rows x 101 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The shape of train :(13418, 101)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "(13418, 101)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 原始数据的维数\n",
    "print('The shape of train :{}'.format(X_train.shape))\n",
    "X_train.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "# 聚类模型,根据不同的酚类数评价聚类算法\n",
    "def K_cluster_analysis(K, X):\n",
    "    start = time.time()\n",
    "    \n",
    "    print(\"K-means begin with clusters:{}\".format(K))\n",
    "    mb_Kmeans = MiniBatchKMeans(n_clusters = K)\n",
    "    mb_Kmeans.fit(X)\n",
    "    \n",
    "    \n",
    "    CH_score = metrics.calinski_harabaz_score(X,mb_Kmeans.predict(X))\n",
    "    \n",
    "    end = time.time()\n",
    "    print(\"CH_Score:{}, time elaps:{}\".format(CH_score, int(end-start)))\n",
    "    \n",
    "    return CH_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "K-means begin with clusters:10\n",
      "CH_Score:1076.118777804762, time elaps:0\n",
      "K-means begin with clusters:20\n",
      "CH_Score:619.5931210805054, time elaps:0\n",
      "K-means begin with clusters:30\n",
      "CH_Score:396.12956790858954, time elaps:0\n",
      "K-means begin with clusters:40\n",
      "CH_Score:250.40534403485503, time elaps:0\n",
      "K-means begin with clusters:50\n",
      "CH_Score:412.50721053413446, time elaps:0\n",
      "K-means begin with clusters:60\n",
      "CH_Score:186.90895617097397, time elaps:0\n",
      "K-means begin with clusters:70\n",
      "CH_Score:249.72759982658778, time elaps:0\n",
      "K-means begin with clusters:80\n",
      "CH_Score:123.271657016928, time elaps:0\n",
      "K-means begin with clusters:90\n",
      "CH_Score:144.0428404080049, time elaps:0\n",
      "K-means begin with clusters:100\n",
      "CH_Score:128.12824136345492, time elaps:0\n"
     ]
    }
   ],
   "source": [
    "# 设置超参数搜索范围\n",
    "Ks = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]\n",
    "CH_scores = []\n",
    "for K in Ks:\n",
    "    ch = K_cluster_analysis(K, X_train)\n",
    "    CH_scores.append(ch)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1a1861ce80>]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD8CAYAAAB+UHOxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAHwxJREFUeJzt3XmcFPWZx/HPMwynB4gCwQFlWIlG\nNyo4MQiKAmpEUVwDyjqjqOjoahSPrGg2hqhr1MSTuJKgGDCeCV7EYBJEV92sEgfxQNGAoDJyjYIj\nQrzgt3881csAAwPTR3V3fd+v17ymu6a6+6F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Iz4aZlQEXARUhhH8GWgAjSdbnYzJwzCbLtvR5GAL0in6qgQmZKEAB\nkEEhhKUhhFei26vx/+BlwDBgSrTaFODEeCrMLTPrBhwH3B3dN2AQMDVaJUnvxc7AAGASQAjhyxDC\nJyT0sxEpBdqaWSnQDlhKgj4fIYTngZWbLN7S52EYcG9wLwEdzKxrujUoALLEzHoAvYFZQJcQwlLw\nkAA6x1dZTt0GXA6sj+7vCnwSQvg6ul+LB2QS9ATqgN9EQ2J3m9kOJPSzEUL4ELgJ+ADf8NcDs0nu\n5yNlS5+HMmBxg/Uy8t4oALLAzHYEHgEuDiF8Gnc9cTCzocCKEMLshosbWTUp09BKgT7AhBBCb2AN\nCRnuaUw0tj0MKAd2B3bAhzk2lZTPR1Oy8n9HAZBhZtYS3/jfH0J4NFq8PLW7Fv1eEVd9OdQfOMHM\n3gMewnftb8N3XUujdboBS+IpL+dqgdoQwqzo/lQ8EJL42QA4ElgUQqgLIXwFPAr0I7mfj5QtfR5q\nge4N1svIe6MAyKBojHsSMC+EcEuDP00DRkW3RwFP5Lq2XAshXBlC6BZC6IEf3HsmhFAJPAsMj1ZL\nxHsBEEJYBiw2s72jRYOBt0jgZyPyAdDXzNpF/29S70ciPx8NbOnzMA04PZoN1BeoTw0VpUMngmWQ\nmR0KvAC8wYZx7x/hxwF+B+yBf/BHhBA2PfhTtMzsCOCHIYShZtYT3yPoCMwBqkIIX8RZX66Y2YH4\nAfFWwELgTPxLWCI/G2Z2NXAKPntuDnA2Pq6diM+HmT0IHIF3/VwOjAMep5HPQxSSd+CzhtYCZ4YQ\natKuQQEgIpJMGgISEUkoBYCISEIpAEREEkoBICKSUAoAEZGEUgCIiCSUAkBEJKEUACIiCfV/6+vd\n9Vqgc0MAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x110ada518>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks, np.array(CH_scores),'b-')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "K-means begin with clusters:100\n",
      "CH_Score:134.85975203719553, time elaps:0\n",
      "K-means begin with clusters:120\n",
      "CH_Score:93.59396310494525, time elaps:0\n",
      "K-means begin with clusters:140\n",
      "CH_Score:403.26033987394163, time elaps:0\n",
      "K-means begin with clusters:160\n",
      "CH_Score:80.42224432738399, time elaps:0\n",
      "K-means begin with clusters:180\n",
      "CH_Score:73.36232539770803, time elaps:0\n",
      "K-means begin with clusters:200\n",
      "CH_Score:117.96886734861963, time elaps:0\n",
      "K-means begin with clusters:220\n",
      "CH_Score:125.99029738797297, time elaps:0\n",
      "K-means begin with clusters:240\n",
      "CH_Score:45.43282533312139, time elaps:1\n",
      "K-means begin with clusters:260\n",
      "CH_Score:40.31552087310026, time elaps:1\n",
      "K-means begin with clusters:280\n",
      "CH_Score:98.0698821589831, time elaps:1\n"
     ]
    }
   ],
   "source": [
    "# 调整超参数搜索范围\n",
    "Ks = range(100,300,20)\n",
    "CH_scores = []\n",
    "for K in Ks:\n",
    "    ch = K_cluster_analysis(K, X_train)\n",
    "    CH_scores.append(ch)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x11026beb8>]"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3XmUXHWZ//H3QwdCwpIFOiFklwQ0\n5JBUk8GIOzCy6Ji4I45ERa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aHV83pwBr3X1jfCDJzzSqh70WWOPuV5Q9lKrrtKc403ad9hJn6q7R\nXv7tIU3XaaNbf/u7EX72bAZ2Er65zwEOA34DPBzdjo7ONeDbhG/JlcCchONcR6g7bI+270bnvgVY\nTegp8ADwTyn4TL8ffWYrCP9xxpWd/+noM30IOD3JOKPjNwAf6nZuYp8p8ApCVcGKsn/rM9J2nfYS\nZ6qu017iTOM1WjHWtF2nGhkrIpJzWa26ERGRKinRi4jknBK9iEjOKdGLiOScEr2ISM4p0YuI5JwS\nvYhIzinRi4jk3P8D9V/azN580vwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1103247b8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks, np.array(CH_scores),'b-')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "K-means begin with clusters:2\n",
      "CH_Score:3070.829307535213, time elaps:0\n",
      "K-means begin with clusters:3\n",
      "CH_Score:2683.6346248673767, time elaps:0\n",
      "K-means begin with clusters:4\n",
      "CH_Score:2431.492525550991, time elaps:0\n",
      "K-means begin with clusters:5\n",
      "CH_Score:1999.2703978912218, time elaps:0\n",
      "K-means begin with clusters:6\n",
      "CH_Score:3980.7241799686462, time elaps:0\n",
      "K-means begin with clusters:7\n",
      "CH_Score:1464.0303999026667, time elaps:0\n",
      "K-means begin with clusters:8\n",
      "CH_Score:1370.6766176753863, time elaps:0\n",
      "K-means begin with clusters:9\n",
      "CH_Score:1723.2529675937442, time elaps:0\n"
     ]
    }
   ],
   "source": [
    "# 设置超参数搜索范围\n",
    "Ks = range(2,10)\n",
    "CH_scores = []\n",
    "for K in Ks:\n",
    "    ch = K_cluster_analysis(K, X_train)\n",
    "    CH_scores.append(ch)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x110296d68>]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAD8CAYAAAB+UHOxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xu81HW1//HXYgOCEgKKioBCihcw\nBdkizngF46Id0Z92tDraMT1aR0vLLnpOHc1Ol2Ol6aks81ppHlNLkhElpdJScXMRBVQINRAVFLzg\nBQTW74/1ndjYvsxmz8x3Lu/n4zGPmfnMd2bWKHvWfNfnZu6OiIjUny5pByAiIulQAhARqVNKACIi\ndUoJQESkTikBiIjUKSUAEZE6pQQgIlKnlABEROqUEoCISJ3qmnYAbdlxxx19yJAhaYchIlJVZs+e\n/Yq792/vuIpOAEOGDKGpqSntMEREqoqZPV/IcSoBiYjUKSUAEZE6pQQgIlKnCk4AZtZgZnPN7O7k\n/lAze9TMFpvZ/5lZ96R9m+T+kuTxIc1e46Kk/Wkzm1jsDyMiIoXryBnAecCiZvf/B7jC3YcBa4Az\nkvYzgDXuvidwRXIcZjYcOAUYAUwCfmxmDZ0LX0REtlZBCcDMBgHHAtcm9w0YB9yeHHITcHxye0py\nn+Tx8cnxU4Bb3X2duz8LLAHGFONDiIhIxxV6BvAD4MvApuT+DsBr7r4hub8cGJjcHggsA0gefz05\n/u/tLTxHRETKrN0EYGYfAVa6++zmzS0c6u081tZzmr/fWWbWZGZNq1atai88kZqxaRNcdx2sXZt2\nJFIvCjkDyALHmdlzwK1E6ecHQB8zy08kGwSsSG4vBwYDJI9vD6xu3t7Cc/7O3a9x90Z3b+zfv92J\nbCI144EH4Mwz4ec/TzsSqRftJgB3v8jdB7n7EKIT9wF3/w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l+GE/0DVYkM9spud4N+H+U8L9v11K9cIqywKnAE0ldHeA/3D2XYkxtGQDclIyk6ALc\n5u4VP7yySuwM/Cb+5ukK3OLu09MNqU2fBW5OyipLgdNTjqdNSY36w8DZacfSFnd/1MxuB+YQ5ZS5\nVPaM4DvMbAfgPeAcd19TqjequWGgIiJSmJorAYmISGGUAERE6pQSgIhInVICEBGpU0oAIiJ1SglA\nRKROKQGIiNQpJQARkTr1/wHPfZwyCsTvTgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x11023fef0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Ks, np.array(CH_scores),'b-')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "###### 通过结果可以看到,最优解是6, 因为CH_Score最大"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
